<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateStaffsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('staffs', function (Blueprint $table) {
            $table->increments('id');
			$table->unsignedSmallInteger('agent_id')->default(0)->comment('代理商ID');
			$table->unsignedSmallInteger('shop_id')->default(0)->comment('门店ID');
			$table->boolean('genre')->default(0)->comment('类型 1:普通员工 2:管理员');
			$table->string('name', 16)->default('')->comment('姓名');
			$table->string('mobile', 16)->default('')->comment('手机号');
			$table->string('wechat', 32)->default('')->comment('微信号');
			$table->string('openid', 32)->default('');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('staffs');
    }
}
